Returns its argument, rounded to the nearest integer. In other words, if its argument is n.5 or greater (where n is an integer), returns n+1, otherwise returns n.
For password, text, and textArea, selects the input area of the object.
Syntax
select()
Description
Use the select method to highlight the input area of a form element. You can use the select method with the focus method to highlight a field and position the cursor for a user response.
Applies to
password, text, textArea
Examples
In the following example, the checkPassword function confirms that a user has entered a valid password. If the password is not valid, the select method highlights the password field and focus method returns focus to it so the user can re-enter the password.
function checkPassword(userPass) {
if (badPassword) {
alert("Please enter your password again.")
userPass.focus()
userPass.select()
}
}
This example assumes that the password is defined as:
The substring method returns a subset of a string object. If a <b, then it returns the subset starting at character a and ending before character b, considering the first character of the string to be character zero (0). If a >b, then it returns the subset starting at character b and ending at character a. If a = b, then it returns the empty string.
Syntax
substring(a, b)
Description
xxx Description to be supplied.
Applies to
string
Examples
If string x is "netscape"then x.substring(0,3) or x.substring(3,0) returns "net" and x.substring(4,7) or x.substring(7,4) returns "cap"
Write HTML to the current window, in sequence with the HTML containing this SCRIPT. SCRIPTs have no effect on paragraphs or other structures in which they may occur.